<template>
  <div class="home">

  </div>
</template>

<script>
// @ is an alias to /src
// axios实例
// let arr = [] let arr = new Array()
// 后端接口地址有多个，并且超时时长不一样
import axios from 'axios'

export default {
  name: 'axios3-1',
  components: {

  },
  created () {
    let instance = axios.create({
      baseURL:'http://localhost:8080',
      timeout:1000
      // 超时时长
    })
    instance.get('/data.json').then(res=>{
      console.log(res)
    })
  },
}
</script>
